// let API = 'https://sangzitest.icebartech.com/api/';
let API = 
  (location.href.includes('icebartech')||location.href.includes('http://localhost'))
  ?'https://enjoyshop.icebartech.com/api/'
  :'https://www.lexiangfuli.vip/api'
  // API = 'https://www.lexiangfuli.vip/api'
const appid = 'wx1a6379b897780c7b'
module.exports = {
  LIST: {
    LOGIN: API + 'wx/redirect/',
    WECHATREJECT:API+`wx/redirect/${appid}/signature`,
    //首页
    //支付
    payOrder: API + `wx/pay/${appid}/mp`,
    payCheck: API + `wx/pay/${appid}/query`,
  },
  UPLOAD:{
    getOSSUploadUrl: API + '/base/sys/h5/getOSSUploadUrl', //
  },
  WX:{
    weiXinLogin: API + '/weixin/weiXinLogin', //微信用户登录
    weiXinIndex: API + '/weixin/weiXinIndex', //微信回调方法
    savePhotoByMediaId: API + '/weixin/savePhotoByMediaId', //微信图片保存到阿里云接口
    indexJsRequire: API + '/weixin/indexJsRequire', //微信获取appId、timestamp、nonceStr、signature
  },  
  PAY:{
    cancelOrder: API + '/weixin/pay/cancelOrder', //微信取消订单,只需传orderId
    findEsPayOrderById: API + '/weixin/pay/findEsPayOrderById', //微信获取订单信息
    findEsPayOrderByPage: API + '/weixin/pay/findEsPayOrderByPage', //微信分页获取订单信息
    repay: API + '/weixin/pay/repay', //微信重新发起支付接口
    weixinPrepay: API + '/weixin/pay/weixinPrepay', //微信获取支付相关信息接口
  },
  COUPON: {
    findStoreEsVirtualCardUseRecordById: API + '/weixin/virtualcarduserecord/findStoreEsVirtualCardUseRecordById', //微信门店获取电子券信息详情
    findStoreEsVirtualCardUseRecordByPage: API + '/weixin/virtualcarduserecord/findStoreEsVirtualCardUseRecordByPage', //微信门店分页获取电子券信息列表接口
    findUserEsVirtualCardUseRecordById: API + '/weixin/virtualcarduserecord/findUserEsVirtualCardUseRecordById', //微信用户获取电子券信息详情
    findUserEsVirtualCardUseRecordByPage: API + '/weixin/virtualcarduserecord/findUserEsVirtualCardUseRecordByPage', //微信用户分页获取电子券信息列表接口
    saveEsVirtualCardUseRecord: API + '/weixin/virtualcarduserecord/saveEsVirtualCardUseRecord', //微信保存核销记录信息
    findEsCouponById: API + '/weixin/coupon/findEsCouponById', //微信获取福利卡信息详情
    findEsCouponByPage: API + '/weixin/coupon/findEsCouponByPage', //微信分页获取福利卡信息/库存列表接口
    chargeByMobile: API + '/weixin/coupon/chargeByMobile', //微信用户充值福利卡
    findByMyCoupon: API + '/weixin/virtualcarduserecord/findByMyCoupon', //微信用户充值福利卡
    findEsThirdCouponDetailsById: API + '/weixin/thirdcoupondetail/findEsThirdCouponDetailsById', //微信用户充值福利卡
    updateMyCoupon: API + '/weixin/virtualcarduserecord/updateMyCoupon', //微信用户充值福利卡
  },
  ORDER: {
    findEsPayOrderById: API + '/weixin/payorder/findEsPayOrderById', //微信获取订单信息详情
    findEsPayOrderByPage: API + '/weixin/payorder/findEsPayOrderByPage', //微信分页获取订单信息/库存列表接口
  },
  MY: {
    findByUserPrice: API + '/weixin/shopusercore/findByUserPrice', //微信获取用户信息详情
    findEsShopUserCoreById: API + '/weixin/shopusercore/findEsShopUserCoreById', //微信获取用户信息详情
    saveEsShopUserCore: API + '/weixin/shopusercore/saveEsShopUserCore', //微信保存用户信息
    normallogin: API + '/weixin/shopusercore/normal/login', //normal用户登录
    speciallogin: API + '/weixin/shopusercore/special/login', //special用户登录
    normallogout: API + '/weixin/shopusercore/normal/logout', //normal用户登出
    speciallogout: API + '/weixin/shopusercore/special/logout', //special用户登出
    findMobileCode: API + '/weixin/shopusercore/findMobileCode', //获取验证码
    findEsPlatformById: API + '/weixin/platform/findEsPlatformById', //微信获取平台信息详情
    saveEsAdvice: API + '/weixin/advice/saveEsAdvice', //微信保存建议信息
    findByUserAskNum: API + '/weixin/advice/findBy', //微信保存建议信息
    saveMsgAck: API + '/weixin/msgAck/saveMsgAck', //微信保存建议信息
    findById: API + '/weixin/advice/findById', //微信保存建议信息
    findByUserPage: API + '/weixin/advice/findByUserPage', //微信保存建议信息
    updateByUserIsRead: API + '/weixin/advice/updateByUserIsRead', //微信保存建议信息
  },
  STORE:{
    findEsStoreById: API + '/weixin/store/findEsStoreById', //微信获取门店信息详情
    login: API + '/weixin/store/login', //微信门店登录
    saveEsStore: API + '/weixin/store/saveEsStore', //微信端修改门店信息
  },
  ADDRESS:{
    saveEsUserAddress: API + '/weixin/address/saveEsUserAddress', //微信保存地址信息
    findEsUserAddressByPage: API + '/weixin/address/findEsUserAddressByPage', //微信分页获取地址信息/库存列表接口
    findEsUserAddressById: API + '/weixin/address/findEsUserAddressById', //微信获取地址信息详情
    deleteEsUserAddress: API + '/weixin/address/deleteEsUserAddress', //微信删除地址
  },
  GOODS: {
    findEsGoodsById: API + '/weixin/goods/findEsGoodsById', //微信获取商品信息详情
    findEsGoodsByPage: API + '/weixin/goods/findEsGoodsByPage', //微信分页获取商品信息/库存列表接口
    findEsBrandByPage: API + '/weixin/brand/findEsBrandByPage', //微信分页获取品牌信息/库存列表接口
    findEsCategoryByPage: API + '/weixin/category/findEsCategoryByPage', //微信分页获取分类信息/库存列表接口
    findEsHotGoodsByPage: API + '/weixin/hotgoods/findEsHotGoodsByPage', //微信分页获取热卖商品信息/库存列表接口
    findEsNoticeByPage: API + '/weixin/notice/findEsNoticeByPage', //微信分页获取公告信息/库存列表接口
    findEsAdvertiseByPage: API + '/weixin/advertise/findEsAdvertiseByPage', //后台分页获取品牌信息/库存列表接口
    findEsGoodsByGoodsCode: API + '/weixin/goods/findEsGoodsByGoodsCode', //微信获取商品信息详情
    payorderNum: API + '/weixin/payorder/thirdQuota', //微信获取商品信息详情
  },
  TEAM: {
    findEsTeamById: API + '/weixin/team/findEsTeamById', //微信获取团建信息详情
    findEsTeamByPage: API + '/weixin/team/findEsTeamByPage', //微信分页获取团建信息/库存列表接口
  }
}